package com.applancer.notification;

import android.util.Log;

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;

public class CheckPlayService {

	private boolean result;

	public CheckPlayService() {

		int resultCode = GooglePlayServicesUtil
				.isGooglePlayServicesAvailable(GcmData.act);
		if (resultCode != ConnectionResult.SUCCESS) {
			if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {
				GooglePlayServicesUtil.getErrorDialog(resultCode, GcmData.act,
						GcmData.PLAY_SERVICES_RESOLUTION_REQUEST).show();
			} else {
				Log.i("not supported device", "This device is not supported.");
				GcmData.act.finish();
			}
			result = false;
		}
		result = true;

	}

	public boolean isTrue() {
		return result;
	}

}
